import type { Ref } from 'vue';

type name = string | number | undefined;

export interface TabItemInstance {
	name: Ref<name>;
	el: Ref<HTMLElement>;
}

interface TabsInjection {
	activeValue: Ref<string | number>;
	activeColor: Ref<string>;
	// activeColor: Ref<string | undefined, string | undefined>; // 允许 activeColor 为 undefined
	setActiveValue(name: name): void;
	// componentName: string;
}

export interface TabsHeadInjection extends TabsInjection {
	addItem(tabItem: TabItemInstance): void;
	removeItem(tabItem: TabItemInstance): void;
}

export interface TabsBottomInjection extends TabsInjection {

}

// export const tabsInjectionKey: InjectionKey<TabsHeadInjection | TabsBottomInjection> = Symbol();
